{ *** cef_render_process_handler_capi.h  *** }

    PCefRenderProcessHandler = ^TCefRenderProcessHandler;

    // Structure used to implement render process callbacks. The functions of this
    // structure will be called on the render process main thread (TID_RENDERER)
    // unless otherwise indicated.
    TCefRenderProcessHandler = record
        // Base structure.
        base: TCefBase;

        // Called after the render process main thread has been created. |extra_info|
        // is a read-only value originating from
        // cef_browser_process_handler_t::on_render_process_thread_created(). Do not
        // keep a reference to |extra_info| outside of this function.
        on_render_thread_created: procedure(
            self: PCefRenderProcessHandler;
            extra_info: PCefListValue); cconv;

        // Called after WebKit has been initialized.
        on_web_kit_initialized: procedure(
            self: PCefRenderProcessHandler); cconv;

        // Called after a browser has been created. When browsing cross-origin a new
        // browser will be created before the old browser with the same identifier is
        // destroyed.
        on_browser_created: procedure(
            self: PCefRenderProcessHandler;
            browser: PCefBrowser); cconv;

        // Called before a browser is destroyed.
        on_browser_destroyed: procedure(
            self: PCefRenderProcessHandler;
            browser: PCefBrowser); cconv;

        // Return the handler for browser load status events.
        ///
        //struct _cef_load_handler_t* (CEF_CALLBACK *get_load_handler)(
        get_load_handler: function(
            self: PCefRenderProcessHandler): PCefLoadHandler; cconv;

        // Called before browser navigation. Return true (1) to cancel the navigation
        // or false (0) to allow the navigation to proceed. The |request| object
        // cannot be modified in this callback.
        on_before_navigation: function(
            self: PCefRenderProcessHandler;
            browser: PCefBrowser;
            frame: PCefFrame;
            request: PCefRequest;
            navigation_type: TCefNavigationType;
            is_redirect: Integer): Integer; cconv;

        // Called immediately after the V8 context for a frame has been created. To
        // retrieve the JavaScript 'window' object use the
        // cef_v8context_t::get_global() function. V8 handles can only be accessed
        // from the thread on which they are created. A task runner for posting tasks
        // on the associated thread can be retrieved via the
        // cef_v8context_t::get_task_runner() function.
        on_context_created: procedure(
            self: PCefRenderProcessHandler;
            browser: PCefBrowser;
            frame: PCefFrame;
            context: PCefv8Context); cconv;

        // Called immediately before the V8 context for a frame is released. No
        // references to the context should be kept after this function is called.
        on_context_released: procedure(
            self: PCefRenderProcessHandler;
            browser: PCefBrowser;
            frame: PCefFrame;
            context: PCefv8Context); cconv;

        // Called for global uncaught exceptions in a frame. Execution of this
        // callback is disabled by default. To enable set
        // CefSettings.uncaught_exception_stack_size > 0.
        on_uncaught_exception: procedure(
            self: PCefRenderProcessHandler;
            browser: PCefBrowser;
            frame: PCefFrame;
            context: PCefv8Context;
            exception: PCefV8Exception;
            stackTrace: PCefV8StackTrace); cconv;

        // Called when a new node in the the browser gets focus. The |node| value may
        // be NULL if no specific node has gained focus. The node object passed to
        // this function represents a snapshot of the DOM at the time this function is
        // executed. DOM objects are only valid for the scope of this function. Do not
        // keep references to or attempt to access any DOM objects outside the scope
        // of this function.
        on_focused_node_changed: procedure(
            self: PCefRenderProcessHandler;
            browser: PCefBrowser;
            frame: PCefFrame;
            node: PCefDomNode); cconv;

        // Called when a new message is received from a different process. Return true
        // (1) if the message was handled or false (0) otherwise. Do not keep a
        // reference to or attempt to access the message outside of this callback.
        on_process_message_received: function(
            self: PCefRenderProcessHandler;
            browser: PCefBrowser;
            source_process: TCefProcessId;
            message: PCefProcessMessage): Integer; cconv;
    end;


